1. The username and password are combined with a single colon (:). This means that the username itself cannot contain a colon.
2. The resulting string is encoded using a variant of Base64.
3. The authorization method and a space (e.g. "Basic") is then prepended to the encoded string.